using System;
using System.ComponentModel.DataAnnotations;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using Abp.Extensions;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 游客信息
    /// </summary>
    public class Customer : ByBranchEntity<Guid>
    {
        /// <summary>
        /// 姓名
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空")]
        [StringLength(50)]
        public string CustomerName { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空")]
        [StringLength(100)]
        public string Mobile { get; set; }
        /// <summary>
        /// 登陆密码
        /// </summary>
        public string LoginPwd { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [StringLength(100)]
        public SexEnum Sex { get; set; }
        /// <summary>
        /// 国家
        /// </summary>
        [StringLength(100)]
        public string Country { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        [StringLength(100)]
        public string Province { get; set; }
        /// <summary>
        /// 城市
        /// </summary>
        [StringLength(100)]
        public string City { get; set; }
        /// <summary>
        /// 县
        /// </summary>
        [StringLength(100)]
        public string County { get; set; }
        /// <summary>
        /// 证件号
        /// </summary>
        [Required(ErrorMessage = "证件号不能为空")]
        public string CertificatesNum { get; set; }
        /// <summary>
        /// 证件类型
        /// </summary>
        [Required]
        public VerifiableTypeEnum VerifiableType { get; set; }
        /// <summary>
        /// 职务
        /// </summary>
        public string Job { get; set; }
        /// <summary>
        /// 微信OpenID
        /// </summary>
        public string OpenID { get; set; }
        /// <summary>
        /// 照片
        /// </summary>
        public string Photo { get; set; }
        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime? DateOfBirth { get; set; }


        public static string CreateRandomPassword()
        {
            return Guid.NewGuid().ToString("N").Truncate(16);
        }
    }
}
